home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / graphic / chiaro10.zip / BATS.DOC next >
Text File  |  1993-03-12  |  9KB  |  253 lines

  1. DIRGIF.BAT 1.0 and ONEGIF.BAT 2.0
  2. =================================
  3. James W. Birdsall
  4. 03/19/93
  5.  
  6.  
  7. 0. CONTENTS
  8. -----------
  9.    0.      CONTENTS
  10.    1.      INTRODUCTION
  11.     1.1     Quick Reference
  12.     1.2     Copyright, License, and Warranty Disclaimer
  13.    2.      USAGE
  14.     2.1     dirgif.bat
  15.     2.2     onegif.bat
  16.    3.      OUTPUT
  17.    4.      TECHNICAL DETAILS
  18.    5.      THE END
  19.  
  20.  
  21. 1. INTRODUCTION
  22. ---------------
  23.  
  24.    These two batch files provide a convenient interface to the GIFCHECK
  25. and GIFSTRIP programs, allowing easy batch processing of a directory and
  26. logging of output to a file. ONEGIF.BAT requires that GIFCHECK.EXE and
  27. GIFSTRIP.EXE be in the current directory or in the path. DIRGIF.BAT
  28. requires that ONEGIF.BAT be in the current directory or in the path.
  29.  
  30.    These batch files work under PC-DOS 3.3, and should work under MS-DOS
  31. 3.3 and PC/MS-DOS 4.0/4.01/5.0. They may not work with earlier versions
  32. of DOS. Check your DOS documentation to see if the "CALL" function is
  33. provided for batch files. If it is not present, DIRGIF.BAT will not
  34. work, but ONEGIF.BAT should still work.
  35.  
  36.  
  37.  1.1 Quick Reference
  38.  -------------------
  39.  
  40.    DIRGIF directory logfile
  41.  
  42.    ONEGIF filename logfile
  43.  
  44.    The log file does not need to exist already, but if it does, the new
  45. output will be appended to the end of the present contents. Note that
  46. for DIRGIF, the directory name should NOT have a trailing backslash
  47. (i.e. C:\NEWGIFS is correct, but C:\NEWGIFS\ is not).
  48.  
  49.  1.2 Copyright, License, and Warranty Disclaimer
  50.  -----------------------------------------------
  51.  
  52.    The Graphics Interchange Format(c) is the Copyright property of
  53. CompuServe Incorporated. GIF(sm) is a Service Mark property of
  54. CompuServe Incorporated.
  55.  
  56.    DIRGIF.BAT and ONEGIF.BAT are not in the public domain. They are
  57. copyright 1993 by James W. Birdsall, all rights reserved.
  58.  
  59.    The following license applies to the entire Chiaro suite, which is
  60. made up of all the files listed in the file MANIFEST. Permission is
  61. granted to do the following:
  62.  
  63.         You may freely redistribute this archive, so long as it contains
  64.         all the files listed in the file MANIFEST, intact and
  65.         unmodified.
  66.  
  67.         You may use the programs contained in this archive for a period
  68.         of 30 days for evaluation purposes.
  69.  
  70.    Payment of the $10 shareware fee (which covers all the programs in
  71. the Chiaro suite) licenses you to use the Chiaro suite beyond the
  72. evaluation period. This license-to-use specifically includes use by
  73. bulletin board systems and other commercial or private information
  74. services.
  75.  
  76.    Registered users will also receive update notices and bug reports,
  77. and are entitled to use future versions without further payment.
  78.  
  79.    The contents of the distribution archive, and all other related
  80. files, information, and services are provided "as is" and without
  81. warranty. To the extent permitted by applicable law, the author
  82. disclaims all warranties, express or implied, including but not limited
  83. to, any implied warranty of merchantability or fitness for a particular
  84. purpose. While effort has been made to ensure that the files,
  85. information, and services are accurate and correct, the author shall not
  86. be liable for damages arising out of the use of or inability to use this
  87. product, including but not limited to, loss of profit, data, or use of
  88. this software, or special, incidental, or consequential damages or other
  89. similar claims, even if the author has been specifically advised of the
  90. possibility of such damages. Some states do not allow the exclusion of
  91. incidental or consequential damages, so the foregoing limitation may not
  92. apply to you.
  93.  
  94.    Information on contacting the author is provided at the end of this
  95. file.
  96.  
  97.  
  98. 2. USAGE
  99. --------
  100.  
  101.  2.1 dirgif.bat
  102.  --------------
  103.  
  104.    DIRGIF.BAT is called with a directory name and a logging file name,
  105. as shown in the quick reference (1.1). All files ending in .GIF in the
  106. given directory are processed. Output is appended to the end of the
  107. logging file.
  108.  
  109.    Note that the directory name should not end with a backslash. This
  110. leads to a few operational idiosyncracies. For example, a drive
  111. specifier alone, such as "d:", will always mean the root directory of
  112. that drive. To indicate the current directory of a drive, use "drive:.".
  113.  
  114.    Note that GIFSTRIP by default writes out the stripped file before
  115. removing the old file. This means that if any files need to be stripped,
  116. the order of the files in the directory will change while DIRGIF.BAT is
  117. going through the directory. Files will never be skipped, but some files
  118. may be processed more than once. If this is a problem, changing
  119. ONEGIF.BAT to use the "-o" option with GIFSTRIP should stop this
  120. behavior.
  121.  
  122.  
  123.  2.2 onegif.bat
  124.  --------------
  125.  
  126.    ONEGIF.BAT is called with a GIF file name and a logging file name, as
  127. shown in the quick reference (1.1). It is called by DIRGIF.BAT but may
  128. be used directly as well. ONEGIF.BAT calls GIFCHECK on the given GIF
  129. file. If the file is OK, or an error is encountered, the filename and a
  130. remark are appended to the logging file. The remark depends on the
  131. errorlevel returned by GIFCHECK. If the file needs to be stripped (also
  132. indicated by the errorlevel of GIFCHECK), GIFSTRIP is called. The
  133. errorlevel returned by GIFSTRIP is then checked, and the filename and an
  134. appropriate remark are appended to the logging file.
  135.  
  136.  
  137. 3. OUTPUT
  138. ---------
  139.  
  140.    The output of GIFCHECK and GIFSTRIP is not logged.
  141.  
  142.    A one-line entry is recorded for each file processed by ONEGIF.BAT.
  143. Each entry is of the form "filename : remark". The possible remarks are:
  144.  
  145.       unrecognized ERRORLEVEL!
  146.  
  147.          GIFCHECK returned an unknown errorlevel. Something is very wrong.
  148.  
  149.       GIF OK
  150.  
  151.          The GIF file was correct and did not need stripping.
  152.  
  153.       not a GIF
  154.  
  155.          The file was not recognized as a GIF file.
  156.  
  157.       GIF with unexpected EOF
  158.  
  159.          The GIF file is corrupted.
  160.  
  161.       ERROR!
  162.  
  163.          GIFCHECK suffered an error while processing the file.
  164.  
  165.       stripped OK
  166.  
  167.          GIFSTRIP stripped the file OK.
  168.  
  169.       error while stripping
  170.  
  171.          GIFSTRIP reported an error. Something is very wrong.
  172.  
  173.  
  174. 4. TECHNICAL DETAILS
  175. --------------------
  176.  
  177.    ONEGIF.BAT calls GIFCHECK with the -b BATCH option.
  178. This means that
  179.  
  180.       1) GIFCHECK will decode the file to ensure that all the image data
  181.          is correct. This process can take some time for large files.
  182.  
  183.       2) GIFCHECK will search through a file for the GIF signature if
  184.          there isn't one at the very beginning. This allows it to
  185.          recognize GIF files that have been processed on Macintosh
  186.          computers or have otherwise acquired junk at the beginning of
  187.          the file. (However, this also means that it will mistake a
  188.          text file containing the strings "GIF87a" or "GIF89a" for a
  189.          very corrupt GIF file, but that shouldn't be a big problem.)
  190.  
  191.       3) GIFCHECK will report errors if any VIOLATIONS or ANOMALIES are
  192.          detected. See GIFCHECK.DOC for definition of these conditions.
  193.  
  194.    ONEGIF.BAT calls GIFSTRIP with the -b BATCH and -n NOSTRICT options,
  195. and possibly the -m MAC option depending on the results of GIFCHECK.
  196. This means that
  197.  
  198.       1) GIFSTRIP uses whatever RAM is available for temporary storage
  199.          before it uses disk space. See GIFSTRIP.DOC for a discussion of
  200.          the potential problems with this.
  201.  
  202.       2) GIFSTRIP does not enforce strict format compliance. See
  203.          GIFSTRIP.DOC for a list of the common but unimportant format
  204.          violations which strict format compliance detects.
  205.  
  206.       3) GIFSTRIP will write the stripped file before removing the old
  207.          file. This can cause trouble if there is not enough disk space,
  208.          and can cause DIRGIF.BAT to process some files twice, but it is
  209.          safer than removing the old file first.
  210.  
  211.       4) If GIFCHECK detected leading junk in the file, GIFSTRIP will
  212.          remove the leading junk (and any trailing junk).
  213.  
  214.    To change the options which ONEGIF.BAT use